import request from '@/utils/request'

// 查询设备列列表
export function listDevice(query) {
  return request({
    url: '/business/device/list',
    method: 'get',
    params: query
  })
}

// 查询设备列所有列表
export function listAllDevice(query) {
  return request({
    url: '/business/device/listAll',
    method: 'get',
    params: query
  })
}

// 查询设备列详细
export function getDevice(id) {
  return request({
    url: '/business/device/getInfo/' + id,
    method: 'get'
  })
}

// 新增设备列
export function addDevice(data) {
  return request({
    url: '/business/device/add',
    method: 'post',
    data: data
  })
}

// 修改设备列
export function updateDevice(data) {
  return request({
    url: '/business/device/edit',
    method: 'post',
    data: data
  })
}

// 删除设备列
export function delDevice(id) {
  return request({
    url: '/business/device/remove/' + id,
    method: 'get'
  })
}
